package com.zlj.springcloud;

import com.zlj.myselfrule.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

/**
 * @Description: java类作用描述
 * @Author: zlj
 * @CreateDate: 2018/6/19 14:11
 * @Version: 1.0.0
 */
@EnableEurekaClient
@SpringBootApplication
@EnableAutoConfiguration(exclude = {HibernateJpaAutoConfiguration.class, DataSourceAutoConfiguration.class})
//在启动该微服务的时候就可以去加载我们自定义的Ribbon配置类，从而使配置生效
@RibbonClient(value = "MICROSERVICECLOUD-DEPT", configuration = {MySelfRule.class})
public class Application_Consumer {

    public static void main(String[] args) {
        SpringApplication.run(Application_Consumer.class, args);
    }

}
